#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include <string.h>
int main()
{
    int count = 1;
    char a[1000];
    scanf("%s", a);
    int n = strlen(a);

    for (int i = 0; i <= n - 2; i++)
    {
        if (a[i] != a[i + 1])
        {
            if ((a[i] > a[i + 1]))
            {
                count = 0;
                break;
            }
        }
        else if ((a[i] == a[i + 1]) && (a[i] == 'a'))
            continue;
        else if ((a[i] == a[i + 1]) && (a[i] == 'b'))
            continue;
    }
    if (count)
    {
        printf("True");
    }
    else
        printf("False");
    return 0;
}